package TemplateMethodDomo.example;

/**
 * @author zsh
 * @Description 模板模式，抽象父类
 * @create 2022-05-09 20:26
 */
public abstract class AbstractDisplay {
    public abstract void open();
    //protected abstract void open();
    public abstract void print();
    public abstract void close();
    final void display(){
        open();
        for (int i = 0; i < 5 ; i++) {
            print();
        }
        close();
    }
}
